<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	
		<link rel="stylesheet" type="text/css" href="css/foundation.css" />
	
</h:head>
<h:body>

<div class="row" style="margin-bottom: 5px;">
	    
	    <div class="nine columns">
	      <ul class="nav-bar right">
	        <li><a href="index.xhtml">Página Principal</a></li>
	        <li><a href="Usuario.xhtml">Usuários</a></li>
	        <li><a href="Produto.xhtml">Cadastrar Produtos</a></li>
	      </ul>
	    </div>
	
	</div><!-- TOPO -->


<div style=" margin: 0 auto; width: 960px;">
  <div style="width: 570x; margin: 5px auto;">
	<h:form id="form1">

		<h:panelGrid columns="10" style="margin-bottom:10px" cellpadding="10">
	      <p:panel header="Cadastrar Cor">
			<h:outputLabel value="Cores: " />
			<p:selectOneMenu id="menuCor" value="#{corBean.cor}" effect="fold" style="width: 150px;">
				<f:selectItem itemLabel="Selecione" />
				<f:selectItems value="#{corBean.listaItems}" />
			</p:selectOneMenu>
		  </p:panel>
			<p:commandButton id="showDialogButton" type="button" value="Add"
				onclick="dlg.show()" />
		
			<p:panel header="Cadastra Categoria">
			<h:outputText value="Categoria: " />
			<p:selectOneMenu value="#{categoriaBean.categoria}" effect="fold" style="width: 150px;">
				<f:selectItem itemLabel="Selecione" />
				<f:selectItems value="#{categoriaBean.listaItems}" />
			</p:selectOneMenu>
			
			 </p:panel>
			
			
			<br />
			<p:panel header="Cadastra Marca">
				<h:outputText value="Marca: " />
				<p:selectOneMenu value="#{marcaBean.marca}" effect="fold" style="width: 150px;">
					<f:selectItem itemLabel="Selecione" />
					<f:selectItems value="#{marcaBean.listaItems}" />
				</p:selectOneMenu>
			 </p:panel>
		</h:panelGrid>
		<br />
			<p:panel header="Selecione a Imagem" style="width: 390px; margin: 5px 0;">
			<p:messages showDetail="true"/>  
	  
	   	     <p:fileUpload value="#{fileUploadController.file}" mode="simple"/>  
	     
	    	 </p:panel>
		<br />
		<h:panelGrid columns="10" style="margin-bottom:10px" cellpadding="10">
		<p:panel header="Descreva o Produto">
		
		<p:inputTextarea rows="10" cols="50" completeMethod="#{autoCompleteBean.completeArea}" queryDelay="750" minQueryLength="4" />  
        </p:panel>
        </h:panelGrid>
        
        <p:panel header="Informe Quantidade">
         
         <p:inputText  style="width: 100px;" />
        </p:panel>
        
        <p:panel header="Informe o Valor">
         
         <p:inputText style="width: 100px;"/>
         </p:panel> 
       <p></p>
       <p:commandButton value="Submit" update="display"/>  
  
   		 <h:outputText id="display" value="Value:  #{buttonBean.number}" />              
	  
	</h:form>

	<p:dialog header="Digite uma Cor" widgetVar="dlg" resizable="false">
		<h:form id="form2">

			<h:panelGrid columns="2" style="margin-bottom:10px">
				<h:outputLabel for="corAdd" value="Cor:" />
				<p:inputText id="corAdd" value="#{corBean.cor.cor}" />
			</h:panelGrid>

			<p:commandButton id="submitButton" value="Salvar" actionListener="#{corBean.incluir()}" 
			update=":form1:menuCor" oncomplete="dlg.hide();" icon="ui-icon-disk"/>
			

		</h:form>
	</p:dialog>
	
	
	
  </div>

</div>

</h:body>
</html>